The Adobe Portable Document Format (PDF) is a file format that represents documents in a manner independent of the creator application and the device used to view or print. One PDF version currently in use is Adobe PDF v 1.7. A PDF document, e.g., in the form of a data file, contains one or more pages that can express static compositions of text, graphics and images, as well as interactive objects such as form fields and annotations. PDF defines several coordinate spaces in which the coordinates specifying text, graphics and image objects are interpreted, including device space and user space. PDF page content is viewed or printed on a raster output device with a built-in coordinate system called device space. To avoid device-dependent effects of specifying coordinates with respect to a single device space, PDF defines a device-independent coordinate system called user space. The user space origin, orientation, and unit size are established for each page of the PDF document from the page's crop box rectangle, intrinsic rotation and resolution. PDF user space is transformed to device space for viewing and printing using a transformation matrix that specifies a linear mapping of two-dimensional coordinates including translation, rotation, reflection, scaling and skewing.
A coordinate P that is expressed with an ordered pair of real numbers (x, y) can also be expressed as the row matrix [x y 1]. The row matrix form facilitates its transformation using a 3-by-3 affine transformation matrix M resulting in a new coordinate P′.
      M    =          [                                    a                                b                                0                                                c                                d                                0                                                e                                f                                1                              ]            P    =          [                                                                  x                                            y                                                              1                  ]                                                              ⁢                                          ⁢                      P            ′                          =                  [                                                                                                                x                      ′                                                                                                  y                      ′                                                                                                  1                      ]                                                                                  ⁢                                                          ⁢                              P                ′                                      =                                          PM                ⁢                                                                  ⁢                                  P                  ′                                            =                              [                                                                                                                              x                                                                          y                                                                                                                                    1                              ]                                                        ⁡                                                          [                                                                                                                                    a                                                                                                        b                                                                                                        0                                                                                                                                                                        c                                                                                                        d                                                                                                        0                                                                                                                                                                        e                                                                                                        f                                                                                                        1                                                                                                                              ]                                                                                                                                            ⁢                                                                                  ⁢                                                                                  ⁢                                          x                      ′                                                        =                                                                                    a                        ×                        x                                            +                                              c                        ×                        y                                            +                                              e                        ⁢                                                                                                  ⁢                                                  y                          ′                                                                                      =                                                                  b                        ×                        c                                            +                                              d                        ×                        y                                            +                      f                                                                                                              
PDF rectangles are specified using the coordinates for a pair of diagonally opposite corners. PDF rectangle sides are constrained to be perpendicular to the user space coordinate system axes. Consider for example the rectangle 1500 and corresponding render area RA shown in FIG. 15. The rectangle R defining the area RA can also be expressed with an array of offsets {left, bottom, right, top} that can be used to specify corner coordinates of the rectangle.Rbl=[left bottom 1]Rbr=[right bottom 1]Rtl=[left top 1]Rtr=[right top 1]
PDF rectangles are transformed differently than PDF coordinates. A PDF rectangle R transformed with 3-by-3 affine transformation matrix M is expected to produce the smallest rectangle R′ that contains all corner coordinates of R transformed with M. This operation is represented with the function g(R, M) where R is a PDF rectangle and M is a 3-by-3 affine transformation matrix.R′=g(R,M)
Consider an image processing software function library, such as the existing Adobe PDF Library (PDFL), which is a library of functions that is included in the Adobe® PDF Library software development kit (SDK) version 8.1 (PDFL SDK 8.1). Currently the PDFL functions accept, e.g., have an interface for receiving, at least two input parameters to customize how PDF graphics are rendered by one or more of the PDFL functions. The two input are (1) a Render Area RA and (2) a Render Matrix MRM. The Render Area RA is a PDF rectangle, expressed in user space units, that confines rendering to visible graphics within its boundaries. The Render Matrix MRM is a 3-by-3 affine transformation matrix, expressed in user space units, that transforms the user space coordinate system into a device coordinate system for drawing and/or other manipulation operations. A successful render operation quantizes transformed page graphics contained within the two-dimensional rectangular area as a two-dimensional raster image. See for example FIG. 16 which shows rectangle 1600 which corresponds to rectangle 1500 of FIG. 15 after an exemplary rendering to device space. The raster image is segmented into rows of pixel data using its stride, which represents the number of bytes required to encode one row of pixel data. Finally the two-dimensional raster image is streamed into a one-dimensional vector of pixel data bytes as output.
The PDFL requires that inputs to the PDFL functions specify the Render Area and Render Matrix data structures using real numbers represented with 32-bit, fixed point integer values. Unfortunately, limiting the inputs to the use of fixed point integer values limits transformations that can be expressed, as well as the locality of transformed graphics that may be rendered by the PDFL. This is because a 32-bit, fixed point integer is used to represent a rational number, where the most-significant 16 bits are used for the signed, integer part and the least significant 16 bits are used for the unsigned, fractional part. Such a representation restricts legal values to the set X where:X={x:xεx=m+f×2−16,mεfε|m|<215,|f|<216}
For the smallest xεX
      x    =          m      +              f        ×                  2                      -            16                                    x    =                  (                              -                          2              15                                +          1                )            +                        (                                    -                              2                16                                      +            1                    )                ×                  2                      -            16                                    x    =                  (                              -            32768                    +          1                )            +                                    -            65536                    +          1                65536                  x    =                  -        32767            -              65535        65536                  x    ≈          -      32767.99998      
For the largest xεX
      x    =          m      +              f        ×                  2                      -            16                                    x    =                  (                              2            15                    -          1                )            +                        (                                    2              16                        -            1                    )                ×                  2                      -            16                                    x    =                  (                  32768          -          1                )            +                        65536          -          1                65536                  x    =          32767      +              65535        65536                  x    ≈          -      32767.99998      
A number rε is approximated with x if ∃x:xεX, |r−x|<2−16. The set of Real numbers that can be approximated with X is denoted as set Y.Y={r:rε,|r|<32768}
As a result of the use of 32 bit fixed point integer values by the PDFL, the Render Area and Render Matrix data structures are subject to the domain restriction of Y when the PDFL functions are used.
                    R        A            =              {                              x            0                    ,                      y            0                    ,                      x            1                    ,                      y            1                          }              ,                  where        ⁢                                  ⁢                  {                                    x              0                        ,                          y              0                        ,                          x              1                        ,                          y              1                                }                    ∈      Y                          M        RM            =              [                                            a                                      b                                      0                                                          c                                      d                                      0                                                          e                                      f                                      1                                      ]              ,                  where        ⁢                                  ⁢                  {                      a            ,            b            ,            c            ,            d            ,            e            ,            f                    }                    ∈      Y      
Unfortunately, the 32 bit fixed point constraint limits the usefulness of the available PDF functions particularly in the case where large images are to be processed. The following example demonstrates a specific render request that cannot be directly fulfilled using the PDFL due to the input constraints. Consider a raster display device with a two-dimensional rectangular display area of 1280×1024 pixels whose origin (0,0) is the top-left coordinate and whose unit size is 96 DPI. In this example the PDFL is directed to render the top-right 2″×2″ area of a 127″×90″ PDF page at six times (×6) device magnification. Assume for this example that the PDF page crop box rectangle Rcrop is located at the user space origin, sized identical to the dimensions of the PDF page, the intrinsic page rotation δ is zero degrees clockwise, and the resolution of user space is 72 DPI.Rcrop={x0,y0,x1,y1}Rcrop={0,0,127×72DPI,90×72DPI}Rcrop={0,0,9144,6480}δ=0°
A Render Area RA corresponding to a 2″×2″ area at the top-right corner of a 127″×90″ PDF page will be calculated. See, for example the rectangle 1900 shown in FIG. 19 which shows the render area corresponding to a 2″×2″ area at the top-right corner of a 127″×90″ PDF page in user space.Rcrop={0,0,9144,6480}RA={9144−Δx,6480−Δy,9144,6480}Δx=Δy=2″×72DPI=144RA={9000,6336,9144,6480}
To transform user space to device space for rendering, a Render Matrix MRM is used that (1) flips user space coordinate across the x-axis, such that the top-left corner of the page becomes the coordinate system origin (See FIG. 20 illustrating rectangle 2000), (2) translates the bottom-left corner of the flipped Render Area RA to the coordinate system origin, and (3) scales user space unit size from 72 DPI to 384 DPI. For this example, the Render Matrix can be expressed as the product of the Default Page Matrix, a Flip Matrix, a Translate Matrix and a Scale Matrix.MRM=MDPMMFMTMS 
A Default Page Matrix MDPM transforms the user space coordinate system to the rotated, cropped page space coordinate system. For a page with the crop box rectangle Rcrop located at the user space origin and an intrinsic page rotation δ equal to zero degrees clockwise, Default Page Matrix MDPM is the 3-by-3 identity matrix.
      M    DPM    =      [                            1                          0                          0                                      0                          1                          0                                      0                          0                          1                      ]  
The Flip Matrix MF transforms the bottom-to-top page coordinate system to the top-to-bottom device coordinate system, as identified from the PDF page crop box rectangle Rcrop. The rectangle Rcrop can be expressed as a 4-by-3 matrix of corner coordinates.
            R      crop        =          {              0        ,        0        ,        9144        ,        6480            }                  R      crop        ≡          [                                                  x              0                                                          y              0                                            1                                                              x              0                                                          y              1                                            1                                                              x              1                                                          y              0                                            1                                                              x              1                                                          y              1                                            1                              ]        ≡          [                                    0                                0                                1                                                0                                6480                                1                                                9144                                0                                1                                                9144                                6480                                1                              ]      
The PDFL function g(R, M) may be used to transform rectangle Rcrop with the Default Page Matrix MPDM to obtain the crop box rectangle Rcrop,DPM expressed in page space units.
            R      crop        =          {              0        ,        0        ,        9144        ,        6480            }                  R              crop        ,        DPM              =          g      ⁡              (                              R            crop                    ,                      M            DPM                          )                        R              crop        ,        DPM              ≡                  [                                            0                                      0                                      1                                                          0                                      6480                                      1                                                          9144                                      0                                      1                                                          9144                                      6480                                      1                                      ]            ⁢              M        DPM                        R              crop        ,        DPM              ≡                  [                                            0                                      0                                      1                                                          0                                      6480                                      1                                                          9144                                      0                                      1                                                          9144                                      6480                                      1                                      ]            ⁡              [                                            1                                      0                                      0                                                          0                                      1                                      0                                                          0                                      0                                      1                                      ]                        R              crop        ,        DPM              ≡          [                                    0                                0                                1                                                0                                6480                                1                                                9144                                0                                1                                                9144                                6480                                1                              ]                  R              crop        ,        DPM              =          {              0        ,        0        ,        9144        ,        6480            }      
The Flip Matrix reflects and translates the page coordinate system across the x-axis using the top offset of the crop box rectangle, expressed in page space units.
            M      F        =          [                                    1                                0                                0                                                0                                              -              1                                            0                                                0                                h                                1                              ]            h    =    6480.0  
A Translate Matrix MT is used to transform the flipped, page coordinate system to the locality coordinate system, such that the bottom-left corner of the Render Area RA is the new origin. Since the Render Area RA was originally expressed for a non-flipped PDF page area, it must be transformed using the Flip Matrix MF to logically cover the same 2″×2″ corner of the PDF page. The rectangle RA can be expressed as a 4-by-3 matrix of corner coordinates.
            R      A        =          {              9000        ,        6336        ,        9144        ,        6480            }                  R      A        ≡          [                                                  x              0                                                          y              0                                            1                                                              x              0                                                          y              1                                            1                                                              x              1                                                          y              0                                            1                                                              x              1                                                          y              1                                            1                              ]        ≡          [                                    9000                                6336                                1                                                9000                                6480                                1                                                9144                                6336                                1                                                9144                                6480                                1                              ]      
The PDFL function g(R, M) is used to transform rectangle RA with the Flip Matrix MF to obtain the flipped Render Area RA,F. See, for example, rectangle 20000 of FIG. 20.
            R              A        ,        F              =          g      ⁡              (                              R            A                    ,                      M            F                          )                        R              A        ,        F              ≡                  [                                            9000                                      6336                                      1                                                          9000                                      6480                                      1                                                          9144                                      6336                                      1                                                          9144                                      6480                                      1                                      ]            ⁢              M        F                        R              A        ,        F              ≡                  [                                            9000                                      6336                                      1                                                          9000                                      6480                                      1                                                          9144                                      6336                                      1                                                          9144                                      6480                                      1                                      ]            ⁡              [                                            1                                      0                                      0                                                          0                                                      -                1                                                    0                                                          0                                      6480                                      1                                      ]                        R              A        ,        F              ≡          [                                    9000                                144                                1                                                9000                                0                                1                                                9144                                144                                1                                                9144                                0                                1                              ]                  R              A        ,        F              =          {              9000        ,        0        ,        9144        ,        144            }      
Relative to the flipped Render Area, RA,F, the Translate Matrix is calculated as:
            M      T        =          [                                    1                                0                                0                                                0                                1                                0                                                              t              x                                                          t              y                                            1                              ]                  t      x        =          -      9000                  t      y        =    0  
The Scale Matrix MS transforms the locality coordinate system unit size to the device coordinate system unit size such that user space resolution, typically 72 DPI, is magnified to the device resolution of 384 DPI.
            M      s        =          [                                                  s              x                                            0                                0                                                0                                              s              y                                            0                                                0                                0                                1                              ]                  s      x        =                  s        y            =                                    96            ⁢                                                  ⁢            D            ⁢                                                  ⁢            P            ⁢                                                  ⁢            I            ×            6                                72            ⁢                                                  ⁢            D            ⁢                                                  ⁢            P            ⁢                                                  ⁢            I                          =                              384            72                    ≈          5.33                    
The effective Render Matrix MRM that transforms the user space coordinate system to the specified device coordinate system is calculated as:
            M      RM        =                  M        DPM            ⁢              M        F            ⁢              M        T            ⁢              M        S                        M      RM        =                                        [                                                            1                                                  0                                                  0                                                                              0                                                  1                                                  0                                                                              0                                                  0                                                  1                                                      ]                    ⁡                      [                                                            1                                                  0                                                  0                                                                              0                                                                      -                    1                                                                    0                                                                              0                                                  h                                                  1                                                      ]                          ⁡                  [                                                    1                                            0                                            0                                                                    0                                            1                                            0                                                                                      t                  x                                                                              t                  y                                                            1                                              ]                    ⁡              [                                                            s                x                                                    0                                      0                                                          0                                                      s                y                                                    0                                                          0                                      0                                      1                                      ]                        M      RM        =                                        [                                                            1                                                  0                                                  0                                                                              0                                                  1                                                  0                                                                              0                                                  0                                                  1                                                      ]                    ⁡                      [                                                            1                                                  0                                                  0                                                                              0                                                                      -                    1                                                                    0                                                                              0                                                  6480                                                  1                                                      ]                          ⁡                  [                                                    1                                            0                                            0                                                                    0                                            1                                            0                                                                                      -                  9000                                                            0                                            1                                              ]                    ⁡              [                                            5.33                                      0                                      0                                                          0                                      5.33                                      0                                                          0                                      0                                      1                                      ]                        M      RM        =          [                                    5.33                                0                                0                                                0                                              -              5.33                                            0                                                              -              47970                                            34538.4                                1                              ]      
The PDFL function g(R, M) is then used to transform rectangle RA with the Render Matrix MRM so that the requested area logically covers the same 2″×2″ locality on the rendered PDF page. See for example FIG. 22 which shows the render area corresponding to a 2″×2″ area at the top right corner of a 127″×90″ PDF page in flipped, translated, scaled page space or device space.
            R              A        ,        RM              =          g      ⁡              (                              R            A                    ,                      M            RM                          )                        R              A        ,        RM              ≡                  [                                            9000                                      6336                                      1                                                          9000                                      6480                                      1                                                          9144                                      6336                                      1                                                          9144                                      6480                                      1                                      ]            ⁡              [                                            5.33                                      0                                      0                                                          0                                                      -                5.33                                                    0                                                                          -                47970                                                    34538.4                                      1                                      ]                        R              A        ,        RM              ≡          [                                    0                                767.52                                1                                                0                                0                                1                                                767.52                                767.52                                1                                                767.52                                0                                1                              ]                  R              A        ,        RM              =          {              0        ,        0        ,        767.52        ,        767.52            }      
To directly render PDF page graphics inside the top-right, 2″×2″ locality of a 127″×90″ PDF page at six times (×6) device resolution, the Render Matrix MRM and Render Area RA,RM must be successfully expressed using the syntax required for the interface to the PDFL functions.
            M      RM        =          [                                    5.33                                0                                0                                                0                                              -              5.33                                            0                                                              -              47970                                            34538.4                                1                              ]                  R              A        ,        RM              =          {              0        ,        0        ,        767.52        ,        767.52            }      
However, the Render Matrix MRM cannot be directly represented using the PDFL interface. The numbers −47970 and −32538.4 cannot be reasonably approximated with X since these values are not contained in the set Y.Y={r: rε,|r|<32768}Y∉{−47970,34538.4}
From the above, it should be appreciated that existing image processing library functions which use 32 bit fixed point values can result in undesirable limitations on the size and/or resolutions of images which are to be processed. While rewriting library functions, e.g., PDFL functions, to use values other than 32 bit fixed point integer values would be one approach to overcoming the limitations discussed above, such an approach would be costly and result in much or all of the existing library functions being discarded.
In view of the above discussions, it should be appreciated that there is a need for methods and apparatus which can be used to render or otherwise process relatively large images and or high resolution images, e.g., images having area or other ranges which require the use of values larger than those which can be expressed using 32 bit fixed integer values. It would be desirable if at least some of the methods and/or apparatus could use or otherwise take advantage of one or more existing library functions and/or hardware which use 32 bit fixed integer values to specify various input and/or output values.